package com.yunshang.shoppingmall.service.impl;

import com.yunshang.shoppingmall.entity.UserProductComment;
import com.yunshang.shoppingmall.mapper.UserProductCommentMapper;
import com.yunshang.shoppingmall.service.UserProductCommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Service("userProductCommentService")
public class UserProductCommentServiceImpl implements UserProductCommentService {
    @Autowired
    UserProductCommentMapper userProductCommentMapper;

    @Override
    public int insert(UserProductComment record) {
        return userProductCommentMapper.insert(record);
    }

    @Override
    public int insertSelective(UserProductComment record) {
        return userProductCommentMapper.insertSelective(record);
    }

    @Override
    public List<UserProductComment> selectProductCommentList(@RequestParam("productId") int productId) {
        return userProductCommentMapper.selectProductCommentList(productId);
    }
}
